﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rappelz.GameServer
{
    public class RankingManager
    {
        /// <summary>
        /// The instance!
        /// </summary>
        protected static RankingManager m_instance;

        /// <summary>
        /// Returns the instance
        /// </summary>
        public static RankingManager Instance
        {
            get
            {
                if (m_instance == null)
                    m_instance = new RankingManager();
                return m_instance;
            }
        }

        public enum RankingType : int
        {
            RankingTypeDonation = 0,
            RankingTypeDonationReward = 1,
        }
// Data           :     constant 0x2, Constant, Type: int, RANKING_TYPE_MAX_INDEX


// UserDefinedType: RankingManager
// BaseClass      :   ArSchedulerObject, offset = 0x0
// VTable         :     , Type:  *
// Enum           :     AR_OBJECT_PRIORITY, Type: int
// Function       :     public void ArSchedulerObject(const struct ArSchedulerObject &)
// Function       :     public void ArSchedulerObject::ArSchedulerObject()
// Function       :     public unsigned int ArSchedulerObject::GetHandle()
// Function       :     public void ArSchedulerObject::onProcess(int)
// Function       :     public bool IsEnable()
// Function       :     public void Disable()
// Function       :     public bool IsDeleteRequested()
// Function       :     public volatile enum ArSchedulerObject::AR_OBJECT_PRIORITY GetPriority()
// Function       :     public volatile unsigned int GetPriorityQueueIndex()
// Function       :     public volatile int GetPendingPriority()
// Function       :     public volatile int GetFinalPriority()
// Function       :     public void EnterSpinLock()
// Function       :     public void LeaveSpinLock()
// Function       :     public volatile __int64 GetLastProcTime()
// Function       :     public volatile unsigned int GetLastProcTick()
// Data           :     this+0x8, Member, Type: volatile bool, bIsDeleteRequested
// Data           :     this+0x10, Member, Type: volatile __int64, last_proc_time
// Data           :     this+0x18, Member, Type: volatile unsigned int, last_proc_tick
// Data           :     this+0x1C, Member, Type: volatile enum ArSchedulerObject::AR_OBJECT_PRIORITY, pending_priority
// Data           :     this+0x20, Member, Type: volatile int, pending_thread_index
// Data           :     this+0x24, Member, Type: volatile unsigned int, pending_priority_queue_index
// Data           :     this+0x28, Member, Type: volatile enum ArSchedulerObject::AR_OBJECT_PRIORITY, priority
// Data           :     this+0x2C, Member, Type: volatile int, thread_index
// Data           :     this+0x30, Member, Type: volatile unsigned int, priority_queue_index
// Data           :     this+0x34, Member, Type: volatile int, lock
// Function       :     protected bool ArSchedulerObject::ProcDelete()
// Function       :     protected bool ArSchedulerObject::IsDeleteable()
// Function       :     protected void ArSchedulerObject::~ArSchedulerObject()
// Data           :     this+0x38, Member, Type: volatile bool, m_bIsEnable
// Function       :     public struct ArSchedulerObject & operator=(const struct ArSchedulerObject &)
// Function       :     public void __local_vftable_ctor_closure()
// Function       :     protected void * __vecDelDtor(unsigned int)
// 
// Data           :   static, [00000000][0000:00000000], Static Member, Type: const unsigned int, RANK_UNKNOWN
// Data           :   static, [001DB730][0002:0002E730], Static Member, Type: const unsigned int[0x2], RANKING_TOP_RECORD_MIN_RANK
// Data           :   static, [00224A48][0003:00008A48], Static Member, Type: const class c_fixed<10000>[0x2], RANKING_TOP_RECORD_MIN_SCORE
// UserDefinedType:   _RANKING_DATA
// Function       :     public void _RANKING_DATA(const struct RankingManager::_RANKING_DATA &)
// Function       :     public void RankingManager::_RANKING_DATA::_RANKING_DATA(const int, const class c_fixed<10000> &, const bool)
// Data           :     this+0x0, Member, Type: const int, m_nPlayerUID
// Data           :     this+0x4, Member, Type: class c_fixed<10000>, m_fScore
// 
// Data           :     this+0xC, Member, Type: unsigned int, m_nRank
// Data           :     this+0x10, Member, Type: bool, m_bIsValid
// UserDefinedType:   _RANKING_INFO
// Function       :     public void _RANKING_INFO(const struct RankingManager::_RANKING_INFO &)
// Function       :     public void RankingManager::_RANKING_INFO::_RANKING_INFO()
// Function       :     public class XCriticalSection & GetLock()
// Function       :     public const unsigned int RankingManager::_RANKING_INFO::GetRank(const int)
// Function       :     public const class c_fixed<10000> RankingManager::_RANKING_INFO::GetRankingScore(const int)
// Function       :     public void RankingManager::_RANKING_INFO::SetRankingScore(const int, const char *, const class c_fixed<10000> &, const bool)
// Function       :     public void RankingManager::_RANKING_INFO::ClearRankingData()
// Function       :     protected void RankingManager::_RANKING_INFO::rerankData(struct RankingManager::_RANKING_DATA *, const bool)
// Data           :     this+0x0, Member, Type: class XCriticalSection, m_csRanking
// 
// Data           :     this+0x40, Member, Type: class std::vector<RankingManager::_RANKING_DATA *,std::allocator<RankingManager::_RANKING_DATA *> >, m_vRanking
// 
// Data           :     this+0x50, Member, Type: class KHash<RankingManager::_RANKING_DATA *,khash_def::hashPr_mod_basic<int> >, m_hsRanking
// 
// Data           :     this+0x70, Member, Type: __int64, m_tNextSettling
// Function       :     public void RankingManager::_RANKING_INFO::~_RANKING_INFO()
// Function       :     public struct RankingManager::_RANKING_INFO & operator=(const struct RankingManager::_RANKING_INFO &)
// Function       :     public void * __vecDelDtor(unsigned int)
// Function       :   public void RankingManager(const struct RankingManager &)
// Function       :   protected void RankingManager::RankingManager()
// Function       :   public static struct RankingManager & RankingManager::Instance()
// Function       :   public void RankingManager::~RankingManager()
// Function       :   public void RankingManager::Init()
// Function       :   public void RankingManager::DeInit()
// Function       :   public const bool RankingManager::IsInitialized()
// Function       :   public void RankingManager::Push(struct GameDBManager::DBProc *)
// Function       :   public void RankingManager::onEndQuery()
// Function       :   public const bool RankingManager::SetNextSettlingTime(const enum RankingManager::_RANKING_TYPE &, const __int64 &)
// Function       :   public const unsigned int RankingManager::GetRank(const enum RankingManager::_RANKING_TYPE &, const int)
// Function       :   public const class c_fixed<10000> RankingManager::GetRankingScore(const enum RankingManager::_RANKING_TYPE &, const int)
// Function       :   public void RankingManager::SetRankingScore(const enum RankingManager::_RANKING_TYPE &, const int, const char *, const class c_fixed<10000> &, const bool)
// Function       :   public void RankingManager::AddRankingScore(const enum RankingManager::_RANKING_TYPE &, const int, const char *, const class c_fixed<10000> &, const bool)

        public void DeleteRankingScore(int nPlayerUID)
        {

        }
// Typedef        :   , Type: struct std::pair<int,c_fixed<10000> >
// Function       :   public void RankingManager::GetRankingTopRecord(const enum RankingManager::_RANKING_TYPE &, class std::vector<std::pair<int,c_fixed<10000> >,std::allocator<std::pair<int,c_fixed<10000> > > > &)
        public bool IsValidRankingScore(RankingType eType, int nPlayerSID)
        {
            return false;
        }
// Function       :   public const bool RankingManager::InvalidateRankingScore(const enum RankingManager::_RANKING_TYPE &, const int)
// Function       :   public void RankingManager::onProcess(int)
// Function       :   protected const struct RankingManager::_RANKING_INFO * RankingManager::getRankingInfo(const enum RankingManager::_RANKING_TYPE &)
// Function       :   protected struct RankingManager::_RANKING_INFO * RankingManager::getRankingInfo(const enum RankingManager::_RANKING_TYPE &)
// Data           :   this+0x40, Member, Type: bool, m_bInitialized
// Data           :   this+0x48, Member, Type: struct RankingManager::_RANKING_INFO[0x2], m_aRankingInfo
// Data           :   this+0x138, Member, Type: class XCriticalSection, m_QueryLock
// UserDefinedType:     XCriticalSection
// 
// Data           :   this+0x178, Member, Type: class std::list<GameDBManager::DBProc *,std::allocator<GameDBManager::DBProc *> >, m_lQueryList
// UserDefinedType:     std::list<GameDBManager::DBProc *,std::allocator<GameDBManager::DBProc *> >
// 
// Function       :   public struct RankingManager & operator=(const struct RankingManager &)
// Function       :   public void __local_vftable_ctor_closure()
// Function       :   public void * __vecDelDtor(unsigned int)


    }
}
